package com.fx.zmlzml.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fx.zmlzml.entity.SysAddressCascade;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface SysAddressCascadeMapper extends BaseMapper<SysAddressCascade> {

    /**
     * 根据父ID查询子地址
     */
    List<SysAddressCascade> selectByParentId(@Param("parentId") Long parentId);

    /**
     * 根据层级查询地址
     */
    List<SysAddressCascade> selectByLevel(@Param("level") Byte level);

    /**
     * 根据完整路径ID查询
     */
    List<SysAddressCascade> selectByFullPathIds(@Param("fullPathIds") String fullPathIds);

    /**
     * 模糊搜索地址名称
     */
    List<SysAddressCascade> searchByName(@Param("name") String name);
}